package com.hup.winHolderService.ws.util;

import com.hup.winHolderService.ws.WsClient;
import com.hup.winHolderService.ws.handler.WsRequestData;
import com.hup.winHolderService.ws.handler.WsRequestMethod;
import lombok.extern.slf4j.Slf4j;

/**
 * 测试 处理WsRequestMethod等 的代码
 *
 * @author hugan
 * @date 2023/10/9
 */
@Slf4j
public class WsTest {

    @WsRequestMethod("int")
    public void intX(@WsRequestData Integer req, WsClient client) {
        log.info("req={}", req);
    }

    @WsRequestMethod("int2")
    public void int2(@WsRequestData int req, WsClient client) {
        log.info("req={}", req);
    }

    @WsRequestMethod("str")
    public void str(@WsRequestData String req, WsClient client) {
        log.info("req={}", req);
    }

    @WsRequestMethod("double")
    public void doubleX(@WsRequestData Double req, WsClient client) {
        log.info("req={}", req);
    }

    @WsRequestMethod("float")
    public void floatX(@WsRequestData Float req, WsClient client) {
        log.info("req={}", req);
    }

    @WsRequestMethod("notReq")
    public void notReq(@WsRequestData Object req, WsClient client) {
        log.info("req={}", req);
    }

    @WsRequestMethod(value = "notReq2", noneRequestData = true)
    public void notReq2(WsClient client) {
        log.info("req");
    }

    //@WsRequestMethod("缺少@WsRequestData注解")
    public void notReq3(Object req, WsClient client) {
        log.info("req={}", req);
    }

}
